<!DOCTYPE html>
<html>
<head>
    <include file="public/head"/>
    <meta charset="utf-8" />
    <title>操作日志</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>操作日志</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="">
        <div class="search_type cc mb10">
            <div class="mb10">
                模块名：
                <select class="form-control" name="module_sign">
                    <option value="">--全部模块--</option>
                    <foreach name="plugin" item="vo">
                        <option value="{$vo.name}" <?php if(isset($data['module_sign']) && $data['module_sign']==$vo['name']){echo 'selected';}?> >{$vo.title}</option>
                    </foreach>
                </select>
                用户名：
                <input type="text" class="form-control" name="user_name" value="<?php if(isset($data['user_name']) && !empty($data['user_name'])){echo $data['user_name'];}?>" placeholder="关键字..." autocomplete="off">
                选择日期：
                <input type="text" class="form-control js-bootstrap-date" name="start_time" value="<?php if(isset($data['start_time']) && !empty($data['start_time'])){echo $data['start_time'];}?>" autocomplete="off">
                -
                <input type="text" class="form-control js-bootstrap-date" name="end_time" value="<?php if(isset($data['end_time']) && !empty($data['end_time'])){echo $data['end_time'];}?>" autocomplete="off">
                类型：
                <select name="type" class="form-control">
                    <option value="">--全部--</option>
                    <option value="1" <?php if(isset($data['type']) && $data['type']==1){echo 'selected';}?> >后端</option>
                    <option value="2" <?php if(isset($data['type']) && $data['type']==2){echo 'selected';}?> >前端</option>
                    <option value="3" <?php if(isset($data['type']) && $data['type']==3){echo 'selected';}?> >接口</option>
                </select>
                <input type="submit" class="btn btn-primary" value="搜索"/>
                <a class="btn btn-danger js-ajax-delete" href="{:cmf_plugin_url('AdminJournal://admin_index/allDel')}">全部删除</a>
                <a class="btn btn-primary js-ajax-delete" href="{:cmf_plugin_url('AdminJournal://admin_index/oneYueQianDel')}">删除一月前数据</a>
                <span style="font-size: 16px">共有 {$num} 条相关记录</span>
                </span>
            </div>
        </div>
    </form>

    <form method="post" class="js-ajax-form" action="#">
        <div class="table_list">
            <table class="table table-hover table-bordered table-list">
                <thead>
                    <tr>
                        <th class="text-center" width="100">用户id</th>
                        <th class="text-center" width="120">用户名</th>
                        <th class="text-center" width="120">模块名</th>
                        <th class="text-center" width="120">模块标识</th>
                        <th class="text-center" width="300">时间</th>
                        <th class="text-center" width="120">IP</th>
                        <th class="text-center" width="120">类型</th>
                        <th class="text-center">路径</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="journal" id="vo">
                        <tr>
                            <td align="center">{$vo.user_id?:'--'}</td>
                            <td align="center">{$vo.user_name?:'--'}</td>
                            <td align="center">{$vo.module_name?:'--'}</td>
                            <td align="center">{$vo.module_sign?:'--'}</td>
                            <td align="center">{:date('Y-m-d H:i:s',$vo.time)}</td>
                            <td align="center">{$vo.ip}</td>
                            <td align="center">
                                <switch name="vo.type">
                                    <case value="1"><span style="color:red">后端</span></case>
                                    <case value="2"><span style="color:green">前端</span></case>
                                    <case value="3"><span style="color:orange">接口</span></case>
                                </switch>
                            </td>
                            <td align="center">{$vo.request}</td>
                        </tr>
                    </volist>
                </tbody>
            </table>
            <div class="pagination">{$page|default=''}</div>
        </div>
    </form>
</div>
<include file="public/scripts"/>
</body>
</html>
